package ru.paswd.marketprice.data.repositories

import android.content.Context
import ru.paswd.marketprice.Server
import ru.paswd.marketprice.api.dto.ReceiptInfo
import ru.paswd.marketprice.listener.OnProcessListener

object ReceiptsRepository : Repository() {
    fun save(
            context: Context,
            date: String,
            sum: String,
            fiscalNumber: String,
            fiscalDocument: String,
            fiscalSign: String,
            type: Int,
            listener: OnProcessListener<Void>
    ) {
        val receiptInfo = ReceiptInfo(date, sum, fiscalNumber, fiscalDocument, fiscalSign, type)
        super.request(context, listener) { api -> api.saveReceipt(receiptInfo) }
    }
}